/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.hl7.datatypes.r2.domain;

import java.io.Serializable;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Id;
import org.hl7.datatypes.r2.basic.CD;
import org.hl7.datatypes.r2.basic.CS;

/**
 *
 * @author Obama
 */
@Entity
public class CDDomain implements Serializable {

    @Id
    private int id;
    
    @Embedded
    private CD cd;
    
    @Embedded
    @AttributeOverrides({
        @AttributeOverride(name = "code.stValue", column =
                @Column(name = "STATUS_CODE")),
        @AttributeOverride(name = "codeSystem.stValue", column =
                @Column(name = "determiner_code.stValue")),
        @AttributeOverride(name = "codeSystemName.stValue", column =
                @Column(name = "entity_code_ets_id")),
        @AttributeOverride(name = "codeSystemVersion.stValue", column =
                @Column(name = "risk_code_ets_id"))
    })
    private CS statusCode;
    
    @Embedded
    @AttributeOverrides({
        @AttributeOverride(name = "code.stValue", column =
                @Column(name = "CODE_CODE")),
        @AttributeOverride(name = "codeSystem.stValue", column =
                @Column(name = "CODE_CODE_SYSTEM")),
        @AttributeOverride(name = "codeSystemName.stValue", column =
                @Column(name = "CODE_CODE_SYSTEM_NAME")),
        @AttributeOverride(name = "codeSystemVersion.stValue", column =
                @Column(name = "CODE_CODE_SYSTEM_VERSION")),
        @AttributeOverride(name = "valueSet.stValue", column =
                @Column(name = "CODE_VALUE_SET")),
        @AttributeOverride(name = "valueSetVersion.stValue", column =
                @Column(name = "CODE_VALUE_SET_VERSION")),
        @AttributeOverride(name = "diplayName.stValue", column =
                @Column(name = "CODE_DIPLAY_NAME"))
    })
    private CD code;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public CD getCd() {
        return cd;
    }

    public void setCd(CD cd) {
        this.cd = cd;
    }

    public CS getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(CS statusCode) {
        this.statusCode = statusCode;
    }
    

    public CD getCode() {
        return code;
    }

    public void setCode(CD code) {
        this.code = code;
    }

}
